/*
 * base.h
 *
 *  Created on: May 3, 2014
 *      Author: Lhmily
 */

#ifndef BASE_H_
#define BASE_H_

#include <iostream>
#include <cstdlib>
#include <time.h>

using std::cout;
using std::endl;
using std::string;
using std::ostream;

template<typename E, typename Comp>
void sort(E* array, int n);


template<typename E>
inline void swap(E A[], int i, int j) {
	E temp = A[i];
	A[i] = A[j];
	A[j] = temp;
}

inline void swap(int &x, int &y) {
	int temp = x;
	x = y;
	y = temp;
}

#endif /* BASE_H_ */
